package cn.sykj.car.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户登陆记录
 * </p>
 *
 * @author yixu
 * @since 2018-12-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = false)
@TableName("operation_log")
@ApiModel(value="OperationLog对象", description="用户登陆记录")
public class OperationLog extends Model<OperationLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户ID")
    private Integer operationUserId;

    @ApiModelProperty(value = "用户名")
    private String operationUserName;

    private Date operationDate;

    private String oparationEvent;

    @ApiModelProperty(value = "远程登陆ip")
    private String remoteIp;

    @ApiModelProperty(value = "日志类型：中文")
    private String operationType;


    public static final String ID = "id";

    public static final String OPERATION_USER_ID = "operation_user_id";

    public static final String OPERATION_USER_NAME = "operation_user_name";

    public static final String OPERATION_DATE = "operation_date";

    public static final String OPARATION_EVENT = "oparation_event";

    public static final String REMOTE_IP = "remote_ip";

    public static final String OPERATION_TYPE = "operation_type";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
